<?php

/**
 * <li>Title: user.php</li>
 * <li>Project: Niu</li>
 * <li>Package: /app/models/</li>
 * <li>Description: models of user's validation </li>
 * <li>Copyright: Copyright (c) 2008</li>
 * <li>Company: Infolex LLC </li>
 * <li>Created on 2009-5-20</li>
 *
 * @author lei_gao
 * @version 1.0
 */
class Login extends AppModel
{
	var $validate = array();
	function islogin($name,$g_password){
		return $this->query("select * from g_logins where g_name='$name' and g_password='$g_password' and g_use_marker=1");
	}
	function updatePassword($name,$g_password,$newPassword){
		$this->query("update g_logins set g_password='$newPassword' where g_name='$name' and g_password='$g_password'");
	}
}
?>